﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Runtime.Serialization;

namespace ChatDLuXService.Model
{
    [DataContract (IsReference = true)]
    public class Message
    {
        private int _messageID;
        private string _message;
        private string _messageRoom;
        private string _messageSender;
        private DateTime _timeStamp;

        [DataMember]
        public int MessageID
        { 
            get { return _messageID; }
            set { _messageID = value; }
        }

        [DataMember]
        // Had to change the name of "Public string Message" varriable to "Public string message" we were recieving an error message 
            //"'Message': member names cannot be the same as thier enclosing type"
            //conflicts with naming of class TODO rename property
        public string message
        {
            get { return _message; }
            set { _message = value; }
        }

        [DataMember]
        public string MessageRoom
        {
            get { return _messageRoom; }
            set { _messageRoom = value; }
        }

        [DataMember]
        public string MessageSender
        {
            get { return _messageSender; }
            set { _messageSender = value; }
        }

        [DataMember]
        public DateTime TimeStamp
        {
            get { return _timeStamp; }
            set { _timeStamp = value; }
        }
    }
}